<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class RechargeModel extends BaseModel
{
    /**ruan shan chu deleted_at 软删除 */
    //use SoftDeletes;

    /**
     * Undocumented variable
     *
     * @var string
     */
    protected $table = 'chongzhi';
    // protected $dates = ['deleted_at'];


    /**
     * 表明模型是否应该被打上时间戳
     *
     * @var bool
     */
    public $timestamps = true;
 

    /**
     * 用戶充值
     *
     * @return void
     */
    public static function UserRecharge()
    {

    }


    /**
     * 用户充值记录
     *
     * @return void
     */
    public static function UserRechargeRecords($pageSize, $page, $map, $sort)
    {
        $orderList = self::select('*')
            ->where($map)
            ->orderBy($sort[0], $sort[1])
            ->paginate($pageSize, [], 'page', $page)->toArray();
        return $orderList;
    }
}
